/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package xmarti.vacaxm.beans.sequence;

import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import xmarti.vacaxm.beans.maintenance.Bull;
import xmarti.vacaxm.beans.maintenance.Cow;

/**
 *
 * @author xmarti
 */
public class SequenceResult implements java.io.Serializable {
    private int id;
    private Sequence sequence;
    private ResultType resultType; 
    private Cow cow;
    private Bull bull;
    private Set<CalfSequence> calfs = new HashSet<CalfSequence>();    
    private String notice;
    public SequenceResult(){        
    }
    public SequenceResult(Sequence sequence) {
        this.sequence = sequence;
    }
    public SequenceResult(Sequence sequence, Bull bull, Cow cow) {
        this.sequence = sequence;
        this.bull= bull;
        this.cow=cow; 
    }
    
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }

    public Sequence getSequence() {
        return sequence;
    }

    public void setSequence(Sequence sequence) {
        this.sequence = sequence;
    }

    public Cow getCow() {
        return cow;
    }

    public void setCow(Cow cow) {
        this.cow = cow;
    }

    public Bull getBull() {
        return bull;
    }

    public void setBull(Bull bull) {
        this.bull = bull;
    }

    public Set<CalfSequence> getCalfs() {
        return calfs;
    }

    public void setCalfs(Set<CalfSequence> calfs) {
        this.calfs = calfs;
    }

    public ResultType getResultType() {
        return resultType;
    }

    public void setResultType(ResultType resultType) {
        this.resultType = resultType;
    }

    public String getNotice() {
        return notice;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }
    
    @Override
    public int hashCode() {
        int hash = 5;
        hash = 61 * hash + Objects.hashCode(this.sequence);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SequenceResult other = (SequenceResult) obj;
        if (!Objects.equals(this.sequence, other.sequence)) {
            return false;
        }
        return true;
    }
    
    @Override
    public String toString(){
        return this.sequence.toString()+"-"+ this.bull.toString() +"-"+ this.cow.toString();
                 
    }
            
    
    
}
